<?php
/* @var $this SettingController */
/* @var $model Setting */

$this->breadcrumbs=array(
	'综合控制台'=>array($this->pre_module_url.'/index/index'),
	'网站配置'=>array($this->pre_module_url.'/setting/webconfig'),
	'系统配置',
);
?>

<div class="pro_filter c_f">
	<div class="filter f_l">
		<?php $form=$this->beginWidget('CActiveForm', array(
			'action'=>Yii::app()->createUrl($this->route),
			'method'=>'get',
		)); ?>
			<label class="">配置名称：</label>
			<?php echo $form->textField($model,'zkl_title',array('class'=>'t_ipt ipt_bg w_140')); ?>
			<label class="">配置标识：</label>
			<?php echo $form->textField($model,'zkl_variable',array('class'=>'t_ipt ipt_bg w_160')); ?>
			<button class="mem_bgx mem_btn01 mr20" type="submit" name="">查找</button>
			<?php echo CHtml::radioButtonList('sitetype',F::setting('site_shop_type'),Setting::model()->getSiteType(),array('class'=>'radio site_type','labelOptions'=>array('class'=>'mr10')))?>
		<?php $this->endWidget(); ?>
	</div>
</div>

<table class="list_table list_table2" width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<th width="" class="pl15">配置名称</th>
		<th width="20%">配置标识</th>
		<th width="30%">配置值</th> 
		<th width="12%">操作</th>                                                    
	</tr>
</table>

<?php     
$this->widget('zii.widgets.CListView', array(    
    'dataProvider'=>$model->search(),    
    'itemView'=>'_view',      
    'emptyText'=>'暂时没有数据',    
    'selectAll'=>array('ids[]','id[]'),    
    'itemsTagName'=>'table',  
    'itemsOptions'=>array('class'=>'list_table list_table2','width'=>'100%','cellpadding'=>0,'cellspacing'=>0),  
    'artLink'=>array(    
        //批量删除   
		array(Yii::t('adm','Delete All'),$this->pre_module_url.'/news/delete','确认批量删除选中项目！'),
    ),    
    'batchItem'=>array(    
        //移动到分类    
        CHtml::linkbtn('创建配置',array($this->pre_module_url.'/setting/create')),    
        //添加到分类    
    ),    
    ));    
?>  


<script type="text/javascript">
$('.site_type').bind('click',function(){
	var type = $(this).val();
	var typename = $(this).next('label').text();
	art.dialog({
	    title: '绑定模型',
	    content: '确认将网站切换到 <b>'+typename+'</b> 模式！',
	    //height: '300px',
	    width: '300px',
	    okValue: '确定',
	    cancelValue: '取消',
	    cancel: function () {},
	    ok:function () {
	    	window.location.href="<?php echo $this->pre_module_url?>/setting/updateSiteType/type/"+type; ;
	    }
	});  
})
</script>